/*
 * RTMLMode.java is part of htn-iface.
 *
 * RTMLMode.java is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * RTMLMode.java is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with RTMLMode.java.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.htn.rtml;

public enum RTMLMode {

	ACKNOWLEDGED,
	COMPLETE,
	CONFIRM, // acknowledgement of job queueing
	FAIL,
	INCOMPLETE,
	INQUIRY, // scoring
	OFFER,
	REPORT,
	REQUEST,
	RESOURCE, // phase0
	UPDATE;

	public static RTMLMode resolve(final String mode) {
		RTMLMode rm = null;
		for (RTMLMode tmp : values()) {
			if (mode.equals(tmp.toString().toLowerCase())) {
				rm = tmp;
				break;
			}
		}
		return rm;
	}
	
//	* "resource" is simply a description of a set of available facilities available at a server
//		(formerly called "dump" and often referred to as "Phase 0" information);
//	* "inquiry" is a client request to consider whether the observations described by the
//		document can be performed by a server;
//	* "offer" is a formal offer by a server to perform the observations;
//	* "request"  is a formal ordering of observations by a client;
//	* "confirm" is a confirmation by a server of an ordering by a "request" or "abort" document;
//	* "reject" is the communication by a server that a request will not or no longer be carried out.
//	* "update" is a request for information by a client and/or a notification by a server about the
//		status of a previously ordered observation;
//	* "incomplete" is a notification by the server that some observations have been made,
//		but the request will no longer be processed;
//	* "complete" is a notification by the server that all of the observations have been made;
//	* "abort" indicates that the request should be stopped.
//	* "fail" indicates that a server is unable to continue processing the request.
//	* "acknowledge" is a signal that a change in the status of a request has been received/processed.


}
